/**
  * Author: Mei
  * Date: 2020-12-10 10:09
  * Description: 
  * Alias Template 别名
  *
  * typename() 会生成临时对象  比如list<>()
  *
  */
#include <vector>
#include <iostream>
#include <bitset>
#include <functional>
#include <algorithm>
#include <list>

using namespace std;

template<typename T>
class MyAlloc {


};
void MyString() {

}
template <typename Container>
void test_moveable(Container c) {
    //获取容器的iterator 然后用萃取机  萃取迭代器的类型
    typedef typename iterator_traits<typename Container::iterator>::value_type  ValType;

    for(long i = 0; i < 2000; ++i) {
        c.insert(c.end(), ValType());
    }
    //....
}
int main() {
    typedef vector<int, MyAlloc<int>> vec; //不能指定参数类型

    template<typename T>
    using vec = vector<T, MyAlloc<T>>; //可以指定其类型
    vec<int> coll; //不能做特化
    vec<double> coll;

    test_moveable(list<MyString>());


    return 0;
}
